<template>
	<view class="body">
		<!-- 新增月初计划任务 -->
		<myHeader :title="title"></myHeader>

		<!-- 新增 -->
		<view class="mt-20 p-20">
			<view class="mt-20 ">
				意见建议：
			</view>
				<view class="mt-20"  style="display: flex;justify-content: center;">
					<textarea class="p-20" :focus="true" v-model="content" placeholder="请输入意见建议" style="border: 1px solid #A9A9A9;"/>
				</view>
			<view class="mt-20 ">
				<button class="bg-red text-white" @click="submitForm">提交</button>
			</view>


		</view>
	</view>
</template>

<script>
	import myHeader from '../components/head.vue'
	import NetWorkTool from '@/api/netWorkTool'
	export default {
		data() {
			return {
				title: '新增建议',
				// 表单数据
				content: ""
			}
		},
		mounted() {},
		methods: {
			submitForm() {
				NetWorkTool.POST('/api/feedback/publish', {
					content: this.content
				}, true).then(res => {
					uni.showToast({
						title: "发布成功",
						duration: 2000
					});
					this.formData = {};
					uni.navigateTo({
						url: './index'
					})
				});
			},

		},
		components: {
			myHeader
		},
	}
</script>

<style lang="scss" scoped>
	@import url("/static/party_building/assets/style/federation.css");
</style>
